Record alignment of class in dictionary and use in TStreamerInfo#21669
Open
pcanal wants to merge 27 commits intoroot-project:masterfrom
Open
Record alignment of class in dictionary and use in TStreamerInfo#21669pcanal wants to merge 27 commits intoroot-project:masterfrom
pcanal wants to merge 27 commits intoroot-project:masterfrom
Conversation
silverweed
reviewed
Mar 24, 2026
Test Results 21 files 21 suites 3d 2h 29m 56s ⏱️ Results for commit 556989c. ♻️ This comment has been updated with latest results. |
jblomer
reviewed
Mar 27, 2026
Contributor
jblomer
left a comment
There was a problem hiding this comment.
Thanks!
I think it would be nice to have a separate test for AlignOf just for the cling part that exercises the different special cases (forward declaration etc.)
520bd32 to
f485286
Compare
jblomer
reviewed
Apr 11, 2026
jblomer
approved these changes
Apr 16, 2026
Includes alignment of allocatation of emulated objects in container
Handle alignment for Emulated Collection of pointer and numerical types
Since align is a power of 2 the modulo may be written as (offset & (align - 1)) (assuming offset is non-negative) Co-authored-by: silverweed <giacomo.parolini@cern.ch>
as the fall back when missing alignment information.
Note this is not quite complete, it could also report the alignment when customized at the data member level but it currently does not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #21667 and thus addresses CMS issue seen at github.com/cms-sw/cmssw/pull/49969
With the current version storage of collection whose content needs to be aligned with more than 4096 is not supported. Extending it to higher number is trivial but require specific handling for each value so we had to stop at an arbitrary value. The error is seen at dictionary compilation time:
Alignment information has also been added to
TDataType, hence improving (tightening) the alignment of numerical type data member in emulated classes and requiring updates some test reference files.